package com.jinxin.platform.cdsideparkmgr.bean.enums;

/**
 * All rights Reserved, Designed By www.beonelot.com
 *
 * @version: V1.0
 * @Copyright: www.beonelot.com Inc. All rights reserved.
 * @Description：
 * @Date: 2021-03-03
 * @Author: Lingnan
 **/

/**
 * 车辆类型定义
 */
public enum CarType {
    CODE_0(0,"小型车(SUV、轿 车、MPV、皮卡)"),
    CODE_1(1,"中型车(小型客 车、面包车、小 型货车)"),
    CODE_2(2,"大型车(中型客 车、中型货车、 重型轿车)");

    private int code;
    private String desc;

    CarType(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    // 普通方法
    public static String getDesc(int code) {
        for (CarType c : CarType.values()) {
            if (c.getCode() == code) {
                return c.desc;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
